<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            margin: 0;
            background-color: black;
        }
        /* 星球 */
        .planet {
            width: 300px;
            height: 300px;
            border-radius: 50%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        @keyframes sun {
            0% {
                transform: translate(-60%, -40%);
                box-shadow: 0 0 0 antiquewhite;
            }
            25% {
                box-shadow: 0 0 50px antiquewhite;
            }
            50% {
                transform: translate(-40%, -60%);
                box-shadow: 0 0 0 antiquewhite;
            }
            75% {
                box-shadow: 0 0 50px antiquewhite;
            }
            100% {
                transform: translate(-60%, -40%);
                box-shadow: 0 0 0 antiquewhite;
            }
        }

        .sun {
            background-color: antiquewhite;
            animation: sun 3s linear infinite;
        }
        .moon {
            background-color: black;
        }
    </style>
</head>
<body>
    <div class="sun planet"></div>
    <div class="moon planet"></div>
</body>
</html>